home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / e-tools / plugins / frumsplugs / examples / gaugetest.e < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.1 KB  |  50 lines

  1. /* Test for 100% Gauge */
  2. -> $VER: GaugeTest.e V1.0 Stephen Sinclair (96.06.16)
  3.  
  4. OPT OSVERSION=37
  5. MODULE 'Tools/EasyGUI','Plugins/Gauge','Intuition/Screens'
  6.  
  7. DEF gp:PTR TO gaugeplugin
  8.  
  9. PROC main()
  10.   easygui('Gauge Test',
  11.     [EQROWS,
  12.       [TEXT,'Gauge:',NIL,TRUE,STRLEN],
  13.       [COLS,
  14.  
  15. /* create a gauge that has a range of 0 to 100, starts at 50, resizes in **
  16. ** the y direction, has a beveled box, and is white.                     */
  17.         [PLUGIN,0,NEW gp.gaugeplugin(100,50,RESIZEY,BEVEL,SHINEPEN)],
  18.         [EQROWS,
  19.           [BUTTON,{topgauge},'Up'],
  20.           [BUTTON,{addgauge},'More'],
  21.           [BUTTON,{subgauge},'Less'],
  22.           [BUTTON,{botgauge},'Down']
  23.         ]
  24.       ],
  25.       [BUTTON,0,'Okay']
  26.     ],10)
  27. ENDPROC
  28.  
  29. CHAR '$VER: GaugeTest V1.0 Stephen Sinclair (96.06.16)',0
  30.  
  31. /* Add 10 onto the gauge */
  32. PROC addgauge(x)
  33.   gp.addgauge(x)
  34. ENDPROC
  35.  
  36. /* Take 10 from the gauge */
  37. PROC subgauge(x)
  38.   gp.addgauge(-x)
  39. ENDPROC
  40.  
  41. /* Put gauge at max value */
  42. PROC topgauge(x)
  43.   gp.setgauge(gp.top)
  44. ENDPROC
  45.  
  46. /* Put gauge at 0 */
  47. PROC botgauge(x)
  48.   gp.setgauge(0)
  49. ENDPROC
  50.